{namespace vh=In2code\Powermail\ViewHelpers}
<f:layout name="Backend" />

	Show Backend Module: Powermail Reporting Marketing

<f:section name="content">
	
	<h1><f:translate key="BackendReportingMarketingTitle" /></h1>
	
	<f:flashMessages class="powermail_message" />
	
	<div class="powermail_reporting_marketing">
		<div class="powermail_module_search">
			<div class="powermail_module_search_inner">
				<f:render partial="Module/Search" arguments="{piVars: piVars, mails: mails, firstMail: firstMail, action : 'reportingMarketingBe'}" />
			</div>
		</div>
		
		<f:if condition="{mails}">
			<f:then>
			
				<h3><f:translate key="BackendReportingFormSubtitle1" /> <f:count subject="{mails}" /> <f:translate key="Emails" />:</h3>

				<div class="powermail_reporting_marketing_fields">
					<div class="powermail_reporting_marketing_fields_inner">
				
						<div class="powermail_reporting_marketing_fields_item">
							<h4><f:translate key="\In2code\Powermail\Domain\Model\Mail.marketingRefererDomain">Referer Domain</f:translate></h4>
							<f:if condition="{vh:Reporting.GetLabelsGoogleCharts(answers: '{groupedMarketingStuff}', fieldUidOrKey: 'marketingRefererDomain')}">
								<f:then>
									<div class="flotContainer"
										 data-flot-active="1"
										 data-flot-data-colors="#FF9900, #FFA722, #FFB444, #FFC266, #FFD088, #FFDDAA, #FFEBCC"
										 data-flot-data-values="{vh:Reporting.GetValuesGoogleCharts(answers:groupedMarketingStuff, fieldUidOrKey:'marketingRefererDomain', separator: ',', urlEncode:0)}"
										 data-flot-data-labels="{vh:Reporting.GetLabelsGoogleCharts(answers:groupedMarketingStuff, fieldUidOrKey:'marketingRefererDomain', separator:',', urlEncode:0)}"></div>
								</f:then>
								<f:else>
									<p class="noValuesToShow"><f:translate key="BackendReportingNoValues">No Values to Show</f:translate></p>
								</f:else>
							</f:if>

				
							<div class="powermail_reporting_form_fields_table_absolute">
								<table class="powermail_reporting_form_fields_table">
									<tr>
										<th style="width: 90%; text-align: center;" class="powermail-close"><f:translate key="BackendReportingFormValue" /></th>
										<th style="width: 10%;" class="powermail_reporting_form_fields_table_right"><f:translate key="BackendReportingFormAmount" /></th>
									</tr>
									<f:for each="{groupedMarketingStuff.marketingRefererDomain}" as="amount" key="value">
										<tr>
											<td>
												<span title="{value}">
													<f:format.crop maxCharacters="80" append="&nbsp;[...]">{value}</f:format.crop>
												</span>
											</td>
											<td class="powermail_reporting_form_fields_table_right">{amount}</td>
										</tr>
									</f:for>
								</table>
							</div>
						</div>
				
						<div class="powermail_reporting_marketing_fields_item">
							<h4><f:translate key="\In2code\Powermail\Domain\Model\Mail.marketingReferer">Referer</f:translate></h4>
							<f:if condition="{vh:Reporting.GetLabelsGoogleCharts(answers: '{groupedMarketingStuff}', fieldUidOrKey: 'marketingReferer')}">
								<f:then>
									<div class="flotContainer"
										 data-flot-active="1"
										 data-flot-data-colors="#FF9900, #FFA722, #FFB444, #FFC266, #FFD088, #FFDDAA, #FFEBCC"
										 data-flot-data-values="{vh:Reporting.GetValuesGoogleCharts(answers:groupedMarketingStuff, fieldUidOrKey:'marketingReferer', separator: ',', urlEncode:0)}"
										 data-flot-data-labels="{vh:Reporting.GetLabelsGoogleCharts(answers:groupedMarketingStuff, fieldUidOrKey:'marketingReferer', separator:',', urlEncode:0)}"></div>
								</f:then>
								<f:else>
									<p class="noValuesToShow"><f:translate key="BackendReportingNoValues">No Values to Show</f:translate></p>
								</f:else>
							</f:if>

							<div class="powermail_reporting_form_fields_table_absolute">
								<table class="powermail_reporting_form_fields_table">
									<tr>
										<th style="width: 90%; text-align: center;" class="powermail-close"><f:translate key="BackendReportingFormValue" /></th>
										<th style="width: 10%;"><f:translate key="BackendReportingFormAmount" /></th>
									</tr>
									<f:for each="{groupedMarketingStuff.marketingReferer}" as="amount" key="value">
										<tr>
											<td>
												<span title="{value}">
													<f:format.crop maxCharacters="80" append="&nbsp;[...]">{value}</f:format.crop>
												</span>
											</td>
											<td>{amount}</td>
										</tr>
									</f:for>
								</table>
							</div>
						</div>
				
						<div class="powermail_reporting_marketing_fields_item">
							<h4><f:translate key="\In2code\Powermail\Domain\Model\Mail.marketingCountry">Country</f:translate></h4>
							<f:if condition="{vh:Reporting.GetLabelsGoogleCharts(answers:groupedMarketingStuff, fieldUidOrKey:'marketingCountry')}">
								<f:then>
									<div class="flotContainer"
										 data-flot-active="1"
										 data-flot-data-colors="#FF9900, #FFA722, #FFB444, #FFC266, #FFD088, #FFDDAA, #FFEBCC"
										 data-flot-data-values="{vh:Reporting.GetValuesGoogleCharts(answers:groupedMarketingStuff, fieldUidOrKey:'marketingCountry', separator: ',', urlEncode:0)}"
										 data-flot-data-labels="{vh:Reporting.GetLabelsGoogleCharts(answers:groupedMarketingStuff, fieldUidOrKey:'marketingCountry', separator:',', urlEncode:0)}"></div>
								</f:then>
								<f:else>
									<p class="noValuesToShow"><f:translate key="BackendReportingNoValues">No Values to Show</f:translate></p>
								</f:else>
							</f:if>

							<div class="powermail_reporting_form_fields_table_absolute">
								<table class="powermail_reporting_form_fields_table">
									<tr>
										<th style="width: 90%; text-align: center;" class="powermail-close"><f:translate key="BackendReportingFormValue" /></th>
										<th style="width: 10%;"><f:translate key="BackendReportingFormAmount" /></th>
									</tr>
									<f:for each="{groupedMarketingStuff.marketingCountry}" as="amount" key="value">
										<tr>
											<td>
												<span title="{value}">
													<f:format.crop maxCharacters="80" append="&nbsp;[...]">{value}</f:format.crop>
												</span>
											</td>
											<td>{amount}</td>
										</tr>
									</f:for>
								</table>
							</div>
						</div>
				
						<div class="powermail_reporting_marketing_fields_item">
							<h4><f:translate key="\In2code\Powermail\Domain\Model\Mail.marketingMobileDevice">Mobile Device</f:translate></h4>
							<f:if condition="{vh:Reporting.GetLabelsGoogleCharts(answers:groupedMarketingStuff, fieldUidOrKey:'marketingMobileDevice')}">
								<f:then>
									<div class="flotContainer"
										 data-flot-active="1"
										 data-flot-data-colors="#FF9900, #FFA722, #FFB444, #FFC266, #FFD088, #FFDDAA, #FFEBCC"
										 data-flot-data-values="{vh:Reporting.GetValuesGoogleCharts(answers:groupedMarketingStuff, fieldUidOrKey:'marketingMobileDevice', separator: ',', urlEncode:0)}"
										 data-flot-data-labels="{vh:Reporting.GetLabelsGoogleCharts(answers:groupedMarketingStuff, fieldUidOrKey:'marketingMobileDevice', separator:',', urlEncode:0)}"></div>
								</f:then>
								<f:else>
									<p class="noValuesToShow"><f:translate key="BackendReportingNoValues">No Values to Show</f:translate></p>
								</f:else>
							</f:if>

							<div class="powermail_reporting_form_fields_table_absolute">
								<table class="powermail_reporting_form_fields_table">
									<tr>
										<th style="width: 90%; text-align: center;" class="powermail-close"><f:translate key="BackendReportingFormValue" /></th>
										<th style="width: 10%;"><f:translate key="BackendReportingFormAmount" /></th>
									</tr>
									<f:for each="{groupedMarketingStuff.marketingMobileDevice}" as="amount" key="value">
										<tr>
											<td>
												<span title="{value}">
													<f:format.crop maxCharacters="80" append="&nbsp;[...]">{value}</f:format.crop>
												</span>
											</td>
											<td>{amount}</td>
										</tr>
									</f:for>
								</table>
							</div>
						</div>
				
						<div class="powermail_reporting_marketing_fields_item">
							<h4><f:translate key="\In2code\Powermail\Domain\Model\Mail.marketingFrontendLanguage">Frontend Language</f:translate></h4>
							<f:if condition="{vh:Reporting.GetLabelsGoogleCharts(answers:groupedMarketingStuff, fieldUidOrKey:'marketingFrontendLanguage')}">
								<f:then>
									<div class="flotContainer"
										 data-flot-active="1"
										 data-flot-data-colors="#FF9900, #FFA722, #FFB444, #FFC266, #FFD088, #FFDDAA, #FFEBCC"
										 data-flot-data-values="{vh:Reporting.GetValuesGoogleCharts(answers:groupedMarketingStuff, fieldUidOrKey:'marketingFrontendLanguage', separator: ',', urlEncode:0)}"
										 data-flot-data-labels="{vh:Reporting.GetLabelsGoogleCharts(answers:groupedMarketingStuff, fieldUidOrKey:'marketingFrontendLanguage', separator:',', urlEncode:0)}"></div>
								</f:then>
								<f:else>
									<p class="noValuesToShow"><f:translate key="BackendReportingNoValues">No Values to Show</f:translate></p>
								</f:else>
							</f:if>

							<div class="powermail_reporting_form_fields_table_absolute">
								<table class="powermail_reporting_form_fields_table">
									<tr>
										<th style="width: 90%; text-align: center;" class="powermail-close"><f:translate key="BackendReportingFormValue" /></th>
										<th style="width: 10%;"><f:translate key="BackendReportingFormAmount" /></th>
									</tr>
									<f:for each="{groupedMarketingStuff.marketingFrontendLanguage}" as="amount" key="value">
										<tr>
											<td>
												<span title="{value}">
													<f:format.crop maxCharacters="80" append="&nbsp;[...]">{value}</f:format.crop>
												</span>
											</td>
											<td>{amount}</td>
										</tr>
									</f:for>
								</table>
							</div>
						</div>
				
						<div class="powermail_reporting_marketing_fields_item">
							<h4><f:translate key="\In2code\Powermail\Domain\Model\Mail.marketingBrowserLanguage">Browser Language</f:translate></h4>
							<f:if condition="{vh:Reporting.GetLabelsGoogleCharts(answers:groupedMarketingStuff,fieldUidOrKey:'marketingBrowserLanguage')}">
								<f:then>
									<div class="flotContainer"
										 data-flot-active="1"
										 data-flot-data-colors="#FF9900, #FFA722, #FFB444, #FFC266, #FFD088, #FFDDAA, #FFEBCC"
										 data-flot-data-values="{vh:Reporting.GetValuesGoogleCharts(answers:groupedMarketingStuff, fieldUidOrKey:'marketingBrowserLanguage', separator: ',', urlEncode:0)}"
										 data-flot-data-labels="{vh:Reporting.GetLabelsGoogleCharts(answers:groupedMarketingStuff, fieldUidOrKey:'marketingBrowserLanguage', separator:',', urlEncode:0)}"></div>
								</f:then>
								<f:else>
									<p class="noValuesToShow"><f:translate key="BackendReportingNoValues">No Values to Show</f:translate></p>
								</f:else>
							</f:if>

							<div class="powermail_reporting_form_fields_table_absolute">
								<table class="powermail_reporting_form_fields_table">
									<tr>
										<th style="width: 90%; text-align: center;" class="powermail-close"><f:translate key="BackendReportingFormValue" /></th>
										<th style="width: 10%;"><f:translate key="BackendReportingFormAmount" /></th>
									</tr>
									<f:for each="{groupedMarketingStuff.marketingBrowserLanguage}" as="amount" key="value">
										<tr>
											<td>
												<span title="{value}">
													<f:format.crop maxCharacters="80" append="&nbsp;[...]">{value}</f:format.crop>
												</span>
											</td>
											<td>{amount}</td>
										</tr>
									</f:for>
								</table>
							</div>
						</div>

						<div class="powermail_reporting_marketing_fields_item">
							<h4><f:translate key="\In2code\Powermail\Domain\Model\Mail.marketingPageFunnel">Page Funnel</f:translate></h4>
							<f:if condition="{vh:Reporting.GetLabelsGoogleCharts(answers:groupedMarketingStuff,fieldUidOrKey:'marketingPageFunnel')}">
								<f:then>
									<div class="flotContainer"
										 data-flot-active="1"
										 data-flot-data-colors="#FF9900, #FFA722, #FFB444, #FFC266, #FFD088, #FFDDAA, #FFEBCC"
										 data-flot-data-values="{vh:Reporting.GetValuesGoogleCharts(answers:groupedMarketingStuff, fieldUidOrKey:'marketingPageFunnel', separator: ',', urlEncode:0)}"
										 data-flot-data-labels="{vh:Reporting.GetLabelsGoogleCharts(answers:groupedMarketingStuff, fieldUidOrKey:'marketingPageFunnel', separator:',', urlEncode:0)}"></div>
								</f:then>
								<f:else>
									<p class="noValuesToShow"><f:translate key="BackendReportingNoValues">No Values to Show</f:translate></p>
								</f:else>
							</f:if>

							<div class="powermail_reporting_form_fields_table_absolute">
								<table class="powermail_reporting_form_fields_table">
									<tr>
										<th style="width: 90%; text-align: center;" class="powermail-close"><f:translate key="BackendReportingFormValue" /></th>
										<th style="width: 10%;"><f:translate key="BackendReportingFormAmount" /></th>
									</tr>
									<f:for each="{groupedMarketingStuff.marketingPageFunnel}" as="amount" key="value">
										<tr>
											<td>
												<f:if condition="{0 : value} == {0 : '-'}">
													<f:then>
														{value}
													</f:then>
													<f:else>
														<f:for each="{vh:String.Explode(string: '{value}')}" as="page" iteration="index">
															<vh:Getter.GetPageNameFromUid uid="{page}" /><f:if condition="{index.isLast}"><f:else> &gt;</f:else></f:if>
														</f:for>
													</f:else>
												</f:if>
											</td>
											<td>{amount}</td>
										</tr>
									</f:for>
								</table>
							</div>
						</div>

					<div class="clear"></div>
				
					</div>
				</div>
			</f:then>
			<f:else>
				<h3><f:translate key="BackendListNoMails" /></h3>
				<p><f:translate key="BackendListNoMailsSub" /></p>
			</f:else>
		</f:if>
	</div>
</f:section>